import 'package:flutter/material.dart';

class LayoutDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
          AspectRatio(
            aspectRatio: 16.0 / 9.0,
            child: Container(color: Color.fromRGBO(3, 54, 255, 1.0)),
          ),
        ],
      ),
    );
  }
}

class StackDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Stack(
      alignment: Alignment.topLeft,
      children: [
        SizedBox(
          width: 200,
          height: 300,
          child: Container(
            alignment: Alignment(0.0, 0.0),
            decoration: BoxDecoration(
              color: Color.fromRGBO(3, 54, 255, 1.0),
              borderRadius: BorderRadius.circular(8.0),
            ),
            child: Icon(Icons.ac_unit, color: Colors.white, size: 32.0),
          ),
        ),
        SizedBox(height: 20),
        SizedBox(
          width: 56,
          height: 90,
          child: Container(
            alignment: Alignment(0.0, 0.0),
            decoration: BoxDecoration(
              color: Color.fromRGBO(3, 54, 255, 1.0),
              borderRadius: BorderRadius.circular(8.0),
            ),
            child: Icon(Icons.ac_unit, color: Colors.white, size: 32.0),
          ),
        ),
        Positioned(
          right: 20,
          top: 15,
          child: Icon(Icons.ac_unit, color: Colors.white, size: 16.0),
        ),
        Positioned(
          right: 10,
          top: 35,
          child: Icon(Icons.ac_unit, color: Colors.white, size: 16.0),
        ),
      ],
    );
  }
}

class IconDemo extends StatelessWidget {
  final IconData icon;
  late final double size;

  IconDemo(this.icon, {this.size = 35.0});

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Icon(icon, size: size, color: Colors.white),
      width: 90.0,
      height: 90.0,
      color: Color.fromRGBO(3, 54, 255, 1.0),
    );
  }
}
